package com.atguigu.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName(value = "user")
public class User {

    //@TableId(type = IdType.ASSIGN_ID)
    @TableId(value = "uid")
    private Long id;

    @TableField(value = "username")
    private String name;

    @TableField(fill = FieldFill.INSERT)
    private Integer age;

    private String email;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    //private Integer deleted;
    @TableLogic
    @TableField(value = "is_deleted")
    private boolean deleted;// 0 false 未删除  1 true 删除

//    @TableLogic
//    @TableField(value = "is_deleted")
//    private Integer deleted;//1  未删除   -1  删除

}
